<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const d1 = new Promise((resolve, reject) => {
      try {
        console.log('正在获取A数据')
        // throw new Error('A数据获取失败')
        setTimeout(() => {
          console.log('A数据获取成功')
          resolve('ok')
        }, 2000);
      } catch (e) {
        reject(e.message)
      }
    })

    const d2 = d1.finally(() => {
      throw new Errow('finally报错')
      return new Promise((resolve, reject) => {
        // reject(1)
      })
    })
    console.log('d2', d2);
  </script>
</body>

</html>